import java.util.List;

import org.junit.Assert;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.AbstractTransactionalJUnit4SpringContextTests;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.test.context.transaction.TransactionConfiguration;
import org.springframework.transaction.annotation.Transactional;

import com.telkomsigma.spring.hibernate.persistence.domain.TPlayer;
import com.telkomsigma.spring.hibernate.service.PlayerService;
import com.telkomsigma.spring.hibernate.service.TeamService;


/**
 *
 */

/**
 * @author Adi
 *
 */
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = { "classpath:applicationContext.xml" })
@TransactionConfiguration(transactionManager = "txManager", defaultRollback = false)
@Transactional
public class TesPlayer extends AbstractTransactionalJUnit4SpringContextTests {
	@Autowired
	PlayerService playerDao;
	
	@Autowired
	TeamService teamDao;
	
	@Test
	public void findAllPlayer(){
		List<TPlayer> list = playerDao.findAll(0);
		Assert.assertNotNull(list);
		System.out.println(list);

	}
}
